Incorporating a spatial array into one or more programmable processor cores

ABSTRACT

Functional units disposed in one or more processor cores are communicatively coupled using both a shared bypass network and a switched network. The shared bypass network enables the functional units to be operated conventionally for general processing while the switched network enables specialized processing in which the functional units are configured as a spatial array. In the spatial array configuration, operands produced by one functional unit can only be sent to a subset of functional units to which dependent instructions have been mapped a priori. The functional units may be dynamically reconfigured at runtime to toggle between operating in the general configuration and operating as the spatial array. Information to control the toggling between operating configurations may be provided in instructions received by the functional units.

STATEMENT OF RELATED APPLICATION

This application claims the benefit of provisional application No. 61/829,750 filed May 31, 2013, the disclosure of which is incorporated by reference herein.

BACKGROUND

Programmable processor cores may be utilized to execute groups or blocks of instructions as atomic units. Such instructions are mapped to the functional units in the cores and significant efficiencies can often be realized when execution loops are created in which the same process is repeated over and over. New data may be continually received and processed as a stream without the need to fetch new instructions. While efficiency is improved in this way, the typical communications paths that are utilized to carry the instructions, for example over a bypass network, are comparatively inefficient.

This Background is provided to introduce a brief context for the Summary and Detailed Description that follow. This Background is not intended to be an aid in determining the scope of the claimed subject matter nor be viewed as limiting the claimed subject matter to implementations that solve any or all of the disadvantages or problems presented above.

SUMMARY

Functional units disposed in one or more processor cores are communicatively coupled using both a shared bypass network and a switched network. The shared bypass network enables the functional units to be operated conventionally for general processing while the switched network enables specialized processing in which the functional units are configured as a spatial array. In the spatial array configuration, operands produced by one functional unit can only be sent to a subset of functional units to which dependent instructions have been mapped a priori. The functional units may be dynamically reconfigured at runtime to toggle between operating in the general configuration and operating as the spatial array. Information to control the toggling between operating configurations may be encoded in instructions received by the functional units, provided in control state associated with an instruction block, provided in other control state embedded in program binary, or be inferred dynamically by hardware.

In various illustrative examples, one or more programmable processor cores are configured to receive and process instructions on a block basis. Functional units in a core may be coupled for inter-functional unit communications using a traditional bypass network and may also be coupled with a separately controlled lightweight switched network that provides a set of specialized datapaths to facilitate communications when the functional units are configured as a spatial array. A mesh is a common topology, for example, that is well suited for this switched network. Each node of the switched network typically includes a multiplexer and a configuration memory that are used to implement highly efficient instruction communications over the specialized datapaths. Instruction blocks may include embedded control information (to toggle the operating configuration of the functional units) and further may include static execution schedule information that is used to map the computations to the functional units when configured as a spatial array.

A specialized compiler, or specialized mapping functionality within a standard compiler, is arranged to recognize code that is likely optimally executed on the spatial array at runtime and can automatically embed the control and schedule information into the instruction set produced as compiler output. Alternatively, the specialized compiler may be arranged to make suggestions to a code developer as to which configuration (i.e., general processing or spatial array) is more likely to execute particular computations with the greatest efficiency (or other figure of merit).

As the blocks of instructions are decoded at runtime, the functional units are dynamically reconfigured by being toggled between the general processing and spatial array configurations according to the embedded control instruction. When configured as a spatial array, a static execution schedule is decoded to map the computations to the array and set up the routing paths through the switched network. The spatial array can then efficiently stream through datasets that are read out of data queues which are connected to the switched network.

The present incorporation of a spatial array into one or more programmable processor cores can be used as the basis of a new processor microarchitecture and ISA (Instruction Set Architecture). In some implementations, functional units across multiple programmable processor cores may be commonly configured in order to provide a larger single spatial array than would be allowed by the number of functional units in a single core. Even larger spatial arrays can be created, in some applications, by extending the switched network to cover functional units in more cores using repeaters that are positioned along the network at various points. The static execution schedule is configured to take into account any propagation delays in such a larger spatial array when mapping the specialized datapaths.

Advantageously, the present incorporation of a spatial array into one or more programmable processor cores enables the high efficiency that is afforded by parallel processing in the spatial array without the complexity and cost of implementing a separate spatial array with duplicated functional units. By overlaying the switched network over the conventional bypass network, the functional units of general purpose cores can effectively be repurposed on-the-fly between normal operation and spatial array to efficiently and effectively meet the requirements of a given process/computation. By embedding the control information in an instruction block (for example, by repurposing otherwise unused fields/bit positions), the instruction interface to the spatial array is entirely consistent with the ISA that is used when the functional units are operating normally in the general processing configuration.

Applications of the present incorporation of a spatial array into one or more programmable processor cores illustratively include small form factor computers, cameras, mobile phones, smartphones, wearable computers, or the like, in which image processing and similar types of processing are employed which can make good use of the processing parallelism afforded by the spatial array.

It should be appreciated that the above-described subject matter may be implemented as a computer-controlled apparatus, a computer process, a computing system, or as an article of manufacture such as one or more computer-readable storage media. These and various other features will be apparent from a reading of the following Detailed Description and a review of the associated drawings.

This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter. Furthermore, the claimed subject matter is not limited to implementations that solve any or all disadvantages noted in any part of this disclosure.

DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an illustrative usage environment that may implement various aspects of the present incorporation of a spatial array into one or more programmable processor cores;

FIG. 2 shows an illustrative group of programmable processor cores that each include a number of functional units that are operable in a conventional manner for general processing;

FIG. 3 shows an illustrative switched network that is configured to overlay the functional units to enable their configuration as a spatial array;

FIG. 4 shows the switched network when overlaid on the functional units;

FIG. 5 shows an alternative overlay network topology in which groups of functional units are operatively coupled to a switched node in the switched network;

FIG. 6 shows details of an illustrative switched node in the switched network;

FIG. 7 shows an illustrative instruction block in which a region of the block has encoded configuration control information as well as a static execution schedule embedded therein;

FIG. 8 is a flowchart of an illustrative method that may be employed by a specialized compiler or by a specialized mapping functionality within a standard compiler;

FIG. 9 shows a flowchart of an illustrative method that may be employed by functional units during runtime;

FIG. 10 shows an arrangement in which a spatial array architecture may be extended to include additional functional units using repeaters;

FIG. 11 shows an illustrative configuration in which one or more fixed spatial arrays are arranged external to the cores; and

Like reference numerals indicate like elements in the drawings. Elements are not drawn to scale unless otherwise indicated.

DETAILED DESCRIPTION

FIG. 1 shows an illustrative usage environment 100 that may implement various aspects of the present incorporation of a spatial array into one or more programmable processor cores. The environment 100 includes a development environment 106 and a runtime environment 112. In the development environment a developer 115 typically works with tools 121, development frameworks, and the like, to create software code 125 that is compiled via a compiler 131 into executable machine code 133. The executable machine code 133 can then be instantiated on a device 138 that, when executed in the runtime environment 112, provides various functionalities and features for a device user 143. FIG. 2 shows an illustrative group of programmable processor cores 200 _(1 . . . N) that each include a number of functional units 205 _(1 . . . N) that are operable in a conventional configuration for general processing. The cores 200 may be part of a processor that is included, for example, as part of the hardware components 155 of device 138 (FIG. 1). The number of cores 200 and the number of functional units 205 employed in the cores are shown in the drawing for illustrative purposes only. Thus, the number of cores 200 and functional units 205 utilized in an actual implementation can vary from that shown according to the particular requirements of such implementation. The functional units 205 may be implemented as arithmetic logic units (ALUs) in some cases and are coupled for inter-functional unit communication typically using a shared operand communication network or pipelined network, such as a conventional bypass network (not shown). Inter-core communication may be facilitated using an inter-core bus 210.

FIG. 3 shows an illustrative switched network 300 that is configured to overlay the functional units to enable their configuration as a spatial array. A plurality of switching nodes 305 _(1 . . . N) are arranged using an interconnected mesh 310. In typical applications the mesh 310 is a two dimensional (2D) mesh, although three dimensional (3D) meshes, 2D tori, or other topologies may also be employed in some scenarios. As shown in FIG. 3, data queues (representatively indicated by reference numeral 316) are located around the periphery of the switched network 300 to buffer data flowing into and out of the network. The number and functionality of switching nodes 305 and data queues 316 used in any given implementation will typically be dependent on specific usage requirements and thus may be expected to vary from what is shown.

FIG. 4 shows the switched network 300 when overlaid on the functional units 205 to enable configuration as a spatial array 400. Spatial array 400 may also be referred to as a spatial acceleration array or spatial acceleration fabric. As shown, each functional unit 205 is connected to at least one switching node 305 in the network 300. An alternative network overlay topology is shown in FIG. 5 in which one or more groups 503 ₁ and 503 _(N) of functional units 205 may be operatively coupled to a switching node 305. In this alternative topology, one functional unit is utilized at a time in the spatial array 400 (FIG. 4). While this topology results in a coarser spatial array which provides relatively less amounts of parallel processing, fewer switching nodes are utilized which can provide benefits in some cases in terms of cost savings and reduction in network complexity and scheduling. In some implementations, the switched network may be arranged for conformance with the execution model known as “Dynamic Specialized Execution Resource” (DySER) as described by Govindaraju, Venkatraman; Ho, Chen-Han; Nowatzki, Tony; Chhugani, Jatin; Satish, Nadathur; Sankaralingam, Karthikeyan; Kim, Changkyu “DySER: Unifying Functionality and Parallelism Specialization for Energy-Efficient Computing” IEEE MICRO, 2012.

FIG. 6 shows details of an illustrative switched node 305 in the switched network 300 (FIG. 3). Each switched node 305 is typically arranged to include a multiplexer 607 and an associated configuration memory 615. The multiplexer 607 operates to select from two or more inputs to provide one or more outputs according to a control signal, S. The configuration memory 615 typically is utilized to store state and other configuration data associated with the switched node 305.

During runtime, when the processor cores 200 (FIG. 2) are typically fetching instructions and running data, the functional units 205 may be dynamically configured (and reconfigured) to operate either conventionally for general processing using the shared bypass network, or as part of the spatial array 400 (FIG. 4) using the switched network 300. In an illustrative example, the configuration information needed to set and/or toggle the configuration of the functional units for either general processing or as a spatial array may be dispatched to the cores 200 as part of instructions in the block. In alternative arrangements, control of the configuration of the functional units may be provided in control state associated with an instruction block, provided in other control state embedded in program binary, or be inferred dynamically by hardware.

FIG. 7 shows an instruction block 703 in which a region of the block is encoded to include configuration control information 711 as well as a static execution schedule 715 that is used to map the instructions to the spatial array 400. In some implementations, the existing ISA for conventional general processing may be utilized with slight modifications that do not negatively impact ISA compatibility. For example, fields or bit positions known as “targets” in an instruction which normally specify routing path and timing for general processing can be repurposed to encode the control information and static execution schedule data for the spatial array 400. Such repurposing advantageously allows the overlay switched network to be very lightweight without requiring additional ISA decoding complexity. When the instruction block is unpacked, instead of the targets being saved in buffers in the normal places in the instruction window, the control and static execution schedule data is read out so that the desired state is implemented for the particular local instruction.

In alternative implementations, the control and static execution schedule information can be packed into a separate monolithic instruction block that is reserved to specify state without the inclusion of additional operating instructions. In addition, a combination of embedded state and separate state specifications may be utilized in some cases.

FIG. 8 is a flowchart of an illustrative method 800 that may be employed, for example, by the specialized compiler 131 shown in FIG. 1. Alternatively, the method 800 may be implemented using a specialized mapping functionality that is incorporated within a standard compiler. Unless specifically stated, the methods or steps in the flowchart of FIG. 8 and those in the other flowcharts shown in the drawings and described below are not constrained to a particular order or sequence. In addition, some of the methods or steps thereof can occur or be performed concurrently and not all the methods or steps have to be performed in a given implementation depending on the requirements of such implementation and some methods or steps may be optionally utilized. Likewise, some steps may be eliminated in some applications to reduce overhead but which may result in increased brittleness, for example. The various feature, cost, overhead, performance, and robustness tradeoffs which may be implemented in any given application may typically be viewed as a matter of design choice.

The method 800 starts by scanning high-level code during the compilation process to identify potential instructions that are potentially optimally executed by the spatial array at runtime (as indicated by reference numeral 805). Similarly, the high-level code is scanned to identify instructions that are not optimally executed by the spatial array at runtime, and instead may be executed by the functional units when configured for general processing (810). In some implementations the recognition of instructions that are particularly well suited for one configuration or the other can be performed entirely automatically or substantially automatically by the specialized compiler 131. In other cases, the compiler 131 can be adapted to expose recommendations and/or a best prediction as to code performance under the various functional unit configurations to the developer 115 (FIG. 1) through a user interface (815).

The specialized compiler 131 selects a functional unit configuration on a per-instruction or group of instructions basis (820) and generates one or more block of instructions for the selected configuration (825). The compiler will also embed encoded control signal information into the instruction blocks to set the functional units to the selected configuration at runtime (830). If the selected functional unit configuration is spatial array, then the specialized compiler 131 will also embed an encoded static execution schedule into the instruction blocks (835). As noted above, in alternative implementations, a separate and unique instruction block can be reserved for dispatching configuration and/or state information.

In some cases, the compiler may identify “holes” in the static execution schedule in which a functional unit is not being used for a current instruction at runtime and thus may be available for processing. As used herein, holes are defined as cycles during which the functional units are unoccupied by the static execution schedule. When a dynamically scheduled instruction is issued from the regular mode into a hole, the static execution schedule is not perturbed nor are any structural hazards created. By enabling the processor's wakeup and select logic to issue instructions into those holes the compiler can fill holes in the static execution schedule with regular dynamic instructions so that functional unit utilization may be increased. Implementation of such hole filling techniques further enables the array to be used in a hybrid mode of operation, supporting both modes of execution at once. Additionally, the compiler may insert holes into the static execution schedule to make room for dynamically issued instructions from the standard mode of operation.

FIG. 9 shows a flowchart of an illustrative method 900 that may be employed by the functional units 205 (FIG. 2) during runtime. One or more blocks of instructions are received at an instruction interface (as indicated by reference numeral 905). The control signal information is decoded (910). If the control signal indicates that the current configuration needs to be changed, then the functional units are dynamically toggled to the other configuration (915). For example, if the functional units are currently configured for general processing and the control signal information indicates that the current instruction should be executed using the spatial array, then the functional units are toggled into the spatial array configuration.

If the new configuration is spatial array, then the static execution schedule is decoded to set up the array (920). The instructions are mapped to the functional units which will typically iterate on datasets (925) until new instructions are fetched (930). The method then repeats from step 905.

FIG. 10 shows an arrangement in which a spatial array architecture may be extended to include additional functional units using repeaters. In typical implementations, a spatial array can comprise functional units in a single core or in pairs of cores, for example, two or four cores. In scenarios in which a larger spatial array is desired, repeaters can be disposed at certain points in the switched network to adjust for propagation delays that may occur through the extended network. The specialized compiler 131 (FIG. 1) can also take such delays into account when generating the static execution schedule for the spatial array. As shown in FIG. 10, a set of repeaters (representatively indicated by reference numeral 1012) is located between two sub-meshes 1017 and 1022. Each sub-mesh in this example includes functional units spanning four cores. In some implementations, the specialized compiler can generate a single static execution schedule for a larger spatial array. Should only a smaller spatial array be available at runtime, artificial delays can be introduced to enable the larger static execution schedule to be superimposed on the smaller spatial array.

FIG. 11 shows an illustrative configuration in which one or more fixed spatial arrays are arranged external to the cores 200 (FIG. 2). In this example, functional units distributed across cores 200 are arranged for selectable configuration between general processing and spatial array processing using bypass and switched networks, as described above. One or more fixed spatial arrays (representatively indicated by reference numeral 1105) are located external to the cores 200 but are in operative communication with the cores using a communications infrastructure (not shown). At runtime, blocks of instructions that are designated by the compiler 131 (FIG. 1) to be given special handling can be dispatched to the fixed spatial array 1105 outside the cores 200. In this way important or otherwise significant computational loops can be executed by the fixed spatial array 1105 with even greater efficiency than could be realized by the general purpose cores 200 when configured as a spatial array.

It should be appreciated that the software components described herein may, when loaded into the CPU 1202 and executed, transform the CPU 1202 and the overall architecture 1200 from a general-purpose computing system into a special-purpose computing system customized to facilitate the functionality presented herein. The CPU 1202 may be constructed from any number of transistors or other discrete circuit elements, which may individually or collectively assume any number of states. More specifically, the CPU 1202 may operate as a finite-state machine, in response to executable instructions contained within the software modules disclosed herein. These computer-executable instructions may transform the CPU 1202 by specifying how the CPU 1202 transitions between states, thereby transforming the transistors or other discrete hardware elements constituting the CPU 1202.

Encoding the software modules presented herein also may transform the physical structure of the computer-readable storage media presented herein. The specific transformation of physical structure may depend on various factors, in different implementations of this description. Examples of such factors may include, but are not limited to, the technology used to implement the computer-readable storage media, whether the computer-readable storage media is characterized as primary or secondary storage, and the like. For example, if the computer-readable storage media is implemented as semiconductor-based memory, the software disclosed herein may be encoded on the computer-readable storage media by transforming the physical state of the semiconductor memory. For example, the software may transform the state of transistors, capacitors, or other discrete circuit elements constituting the semiconductor memory. The software also may transform the physical state of such components in order to store data thereupon.

As another example, the computer-readable storage media disclosed herein may be implemented using magnetic or optical technology. In such implementations, the software presented herein may transform the physical state of magnetic or optical media, when the software is encoded therein. These transformations may include altering the magnetic characteristics of particular locations within given magnetic media. These transformations also may include altering the physical features or characteristics of particular locations within given optical media, to change the optical characteristics of those locations. Other transformations of physical media are possible without departing from the scope and spirit of the present description, with the foregoing examples provided only to facilitate this discussion.

In light of the above, it should be appreciated that many types of physical transformations take place in the architecture 1200 in order to store and execute the software components presented herein. It also should be appreciated that the architecture 1200 may include other types of computing devices, including hand-held computers, small form factor computers, wearable computers and devices, embedded computer systems, smartphones, PDAs, and other types of computing devices known to those skilled in the art. IBased on the foregoing, it should be appreciated that technologies for incorporating a spatial array into one or more programmable processor cores have been disclosed herein. Although the subject matter presented herein has been described in language specific to computer structural features, methodological and transformative acts, specific computing machinery, and computer readable storage media, it is to be understood that the invention defined in the appended claims is not necessarily limited to the specific features, acts, or media described herein. Rather, the specific features, acts, and mediums are disclosed as example forms of implementing the claims.

The subject matter described above is provided by way of illustration only and should not be construed as limiting. Various modifications and changes may be made to the subject matter described herein without following the example embodiments and applications illustrated and described, and without departing from the true spirit and scope of the present invention, which is set forth in the following claims. 

What is claimed:
 1. A method of operating a processor comprising a plurality of functional units arranged in one or more cores, comprising: configuring the functional units to operate in one of two discrete operational modes, a first discrete operational mode being implemented with the functional units in a standard core configuration using a first datapath, and a second discrete mode being implemented with the functional units in a spatial array configuration using a second datapath; receiving a block of operating instructions, the operating instructions including an indication of the operational mode to be utilized for the block; and dynamically reconfiguring the functional units at runtime to operate in one or the other discrete operational mode according to the received block of operating instructions.
 2. The method of claim 1 in which the block of operating instructions further includes a static execution schedule for the spatial array configuration.
 3. The method of claim 2 in which the static execution schedule is embedded in the received block.
 4. The method of claim 3 in which the embedding includes replacing target bits in the operating instructions with static execution schedule information.
 5. The method of claim 4 in which the static execution schedule information comprises routing paths or routing tables.
 6. The method of claim 2 in which the static execution schedule is included in a separate received block.
 7. The method of claim 2 in which the static execution schedule is partially implemented using embedded information in the received block and partially implemented using information in a separate received block.
 8. The method of claim 1 further including implementing one or more data queues to store data for processing by the functional units, the data queue being accessible by the functional units when operating in either operational mode.
 9. The method of claim 8 in which the data queue is a FIFO (first in, first out) queue.
 10. The method of claim 1 in which the functional units are distributed across two distinct processing cores.
 11. The method of claim 1 in which the functional units are distributed across four distinct processing cores.
 12. The method of claim 1 which the functional units are distributed across one or more processing cores and in which the switched network further includes one or more repeaters respectively disposed between one or more of the cores.
 13. The method of claim 1 further including coupling the functional units for inter-unit communication using two separate datapaths or two separate control paths.
 14. A microarchitecture, comprising: a plurality of arithmetic logic units (ALUs) distributed across one or more cores of a programmable processor; a pipelined datapath providing inter-ALU connectivity while the processor is configured to perform standard processing; a switched network providing inter-ALU connectivity configured to provide switchable configurations of ALUs, the ALUs switchably configurable for standard operations and for spatial array processing; and an instruction set interface configured for receiving instructions, the instructions including operating instructions and control information for dynamically reconfiguring the ALUs during runtime.
 15. The microarchitecture of claim 14 in which the switched network comprises a mesh.
 16. The microarchitecture of claim 15 in which the mesh is one of 2D mesh or 3D mesh.
 17. A method for operating one or more processor cores, comprising: implementing a plurality of arithmetic logic units (ALUs) instantiated in the one or more processor cores; implementing one or more fixed spatial arrays external to the one or more processor cores; simultaneously interconnecting the ALUs using two sets of datapaths, a first set of datapaths being implemented at least in part using a bypass network, a second set of datapaths being implemented at least in part by a switched network; and configuring the ALUs to operate (a) as a spatial array with inter-ALU communications being conducted over the switched network or (b) for general processing with inter-ALU communications being conducted over the bypass network.
 18. The method of claim 17 further including dispatching special instruction blocks to the one or more external spatial arrays for processing.
 19. The method of claim 17 further including receiving a block of operating instructions.
 20. The method of claim 19 further including dynamically reconfiguring some of the ALUs at runtime according to the received block of operating instruction. 